<!--
 * @Author: jqm123 2289662078@qq.com
 * @Date: 2025-06-10 15:02:14
 * @LastEditors: jqm123 2289662078@qq.com
 * @LastEditTime: 2025-09-02 14:53:52
 * @FilePath: /anxinxiu/src/views/paySuccess.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div class="home">
    <van-empty
      class="custom-image"
      image="https://zxcxappimg.oss-cn-hangzhou.aliyuncs.com//zxcxmall/2025/05/26/49e2feee0429496fba8e208fd2efb385.png"
      description="支付成功"
    >
      <van-button
        round
        block
        type="danger"
        class="bottom-button"
        @click="goOrder"
        >回到订单</van-button
      >
    </van-empty>
  </div>
</template>

<script>
import { isZxcxApp } from "@/utils/common";
import { zxcxGetUserInfo } from "@/utils/zxcxWebkits";
export default {
  components: {},
  props: {},
  data() {
    return {};
  },
  watch: {},
  computed: {},
  methods: {
    goOrder() {
      this.$router.replace({
        path: "/order",
        query: {
          id: -1,
        },
      });
    },
    async login() {
      if (isZxcxApp()) {
        let res = await zxcxGetUserInfo();
        let userInfo = JSON.parse(res);
        await this.$store.dispatch("user/updateUserInfo", userInfo.userId);
      }
    },
  },
  created() {},
  async mounted() {
    await this.login();
  },
};
</script>
<style lang="less" scoped>
.home {
  width: 100%;
  min-height: 100vh;
  //   display: flex;
  //   align-items: center;
  //   justify-content: center;
  /deep/ .custom-image .van-empty__image {
    max-width: 200px;
    min-width: 200px;
    height: 200px;
  }
  /deep/ .van-empty__bottom {
    padding: 0 340px;
    width: 100%;
  }
}
</style>
